package com.neuedu.his.controller;

import com.neuedu.his.common.core.UnCRUDBaseController;
import com.neuedu.his.service.FileService;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;


@WebServlet("/upload/*")
public class FileController  extends UnCRUDBaseController {

    private FileService fileService = new FileService();

    public Map upload(HttpServletRequest request, HttpServletResponse response){
        return fileService.upload(request);
    }

    public void download(HttpServletRequest request, HttpServletResponse response) throws IOException {
        fileService.download(request,response);
    }

}
